package com.sfx.messagequeue.mqServer.mapper;

import com.sfx.messagequeue.mqServer.core.Binding;
import com.sfx.messagequeue.mqServer.core.Exchange;
import com.sfx.messagequeue.mqServer.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.concurrent.Future;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-07-31
 * Time: 16:35
 */
@Mapper
public interface MetaMapper {
    //创建交换机表
    void createExchangeTable();
    //创建队列表
    void createQueueTable();
    //创建绑定表
    void createBindingTable();

    //增加交换机
    void insertExchange(Exchange exchange);
    //删除交换机
    void deleteExchange(String exchangeName);
    //查询所有的交换机
    List<Exchange> selectAllExchange();
    //增加队列
    void insertQueue(MSGQueue msgQueue);
    //删除队列
    void deleteQueue(String queueName);
    //查询所有的队列
    List<MSGQueue> selectAllQueue();
    //增加绑定
    void insertBinding(Binding binding);
    //删除绑定
    void deleteBinding(Binding binding);
    //查询所有的绑定
    List<Binding> selectAllBinding();
}
